package com.ruoyi.xyh.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.xyh.mapper.SupplyDemandMapper;
import com.ruoyi.xyh.domain.SupplyDemand;
import com.ruoyi.xyh.service.ISupplyDemandService;

/**
 * 供求信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-26
 */
@Service
public class SupplyDemandServiceImpl implements ISupplyDemandService 
{
    @Autowired
    private SupplyDemandMapper supplyDemandMapper;

    /**
     * 查询供求信息
     * 
     * @param id 供求信息主键
     * @return 供求信息
     */
    @Override
    public SupplyDemand selectSupplyDemandById(Long id)
    {
        return supplyDemandMapper.selectSupplyDemandById(id);
    }

    /**
     * 查询供求信息列表
     * 
     * @param supplyDemand 供求信息
     * @return 供求信息
     */
    @Override
    public List<SupplyDemand> selectSupplyDemandList(SupplyDemand supplyDemand)
    {
        return supplyDemandMapper.selectSupplyDemandList(supplyDemand);
    }

    /**
     * 新增供求信息
     * 
     * @param supplyDemand 供求信息
     * @return 结果
     */
    @Override
    public int insertSupplyDemand(SupplyDemand supplyDemand)
    {
        return supplyDemandMapper.insertSupplyDemand(supplyDemand);
    }

    /**
     * 修改供求信息
     * 
     * @param supplyDemand 供求信息
     * @return 结果
     */
    @Override
    public int updateSupplyDemand(SupplyDemand supplyDemand)
    {
        return supplyDemandMapper.updateSupplyDemand(supplyDemand);
    }

    /**
     * 批量删除供求信息
     * 
     * @param ids 需要删除的供求信息主键
     * @return 结果
     */
    @Override
    public int deleteSupplyDemandByIds(Long[] ids)
    {
        return supplyDemandMapper.deleteSupplyDemandByIds(ids);
    }

    /**
     * 删除供求信息信息
     * 
     * @param id 供求信息主键
     * @return 结果
     */
    @Override
    public int deleteSupplyDemandById(Long id)
    {
        return supplyDemandMapper.deleteSupplyDemandById(id);
    }
}
